Skip to contentSkip to conversation

rust: add missing zlib and zstd dependencies

PATCH Superseded [email protected] 2 participants 12 messages Dec 10, 2025 – Dec 11, 2025

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/5 rust: add missing zlib and zstd dependencies

From: Peter Tatrai <[email protected]>

Rust's internal LLVM requires zlib and zstd compression libraries when building rustc_codegen_llvm and other compiler components. Without these dependencies, building Rust for target fails with linker errors:

error: linking with target-rust-ccld failed: exit status: 1 = note: undefined reference to `compress2'
= note: undefined reference to `uncompress'
= note: undefined reference to `ZSTD_decompress'
= note: undefined reference to `ZSTD_isError'
= note: undefined reference to `ZSTD_compress2'
= note: undefined reference to `crc32'

This manifested in oe-selftest failure on qemuppc:
oe-selftest -r rust.RustSelfTestSystemEmulated.test_rust

Additionally, this was observed while testing with other targets as well.

---
 meta/lib/oeqa/selftest/cases/rust.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/lib/oeqa/selftest/cases/rust.py +2 -2
index 31222e2456..01a98339a6 100644
@@ -47,7 +47,7 @@ class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase):
         bitbake("{} -c test_compile".format(recipe))
         builddir = get_bb_var("RUSTSRC", "rust")
         # build core-image-minimal with required packages
-        default_installed_packages = ["libgcc", "libstdc++", "libatomic", "libgomp"]
+        default_installed_packages = ["libgcc", "libstdc++", "libatomic", "libgomp", "libzstd"]
         features = []
         features.append('IMAGE_FEATURES += "ssh-server-dropbear"')
         features.append('CORE_IMAGE_EXTRA_INSTALL += "{0}"'.format(" ".join(default_installed_packages)))
@@ -124,7 +124,7 @@ class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase):
             cmd = cmd + " export RUST_TARGET_PATH=%s/rust-targets;" % rustlibpath
             # Strip debug symbols from test binaries to reduce size (300+ MB -> ~140 MB)
             # PowerPC mac99 QEMU has 768MB RAM limit, so we need to minimize test binary sizes
-            cmd = cmd + " export RUSTFLAGS='-C strip=debuginfo';"
+            cmd = cmd + " export RUSTFLAGS='-C strip=debuginfo -Clink-arg=-lz -Clink-arg=-lzstd';"
             # Trigger testing.
             cmd = cmd + " export TEST_DEVICE_ADDR=\"%s:12345\";" % qemu.ip
             cmd = cmd + " cd %s; python3 src/bootstrap/bootstrap.py test %s --target %s" % (builddir, testargs, targetsys)
Signature · 1 line
2.49.0
#1 lore raw

PATCH 2/5 rust: Exclude tier-check and fix openssl-sys build error

From: Yash Shinde <[email protected]>

- Exclude tier-check which fails due to file not found error.

Testing stage2 platform support check (x86_64-poky-linux-gnu)
Compiling tier-check v0.1.0 (/srv/pokybuild/yocto-worker/qemux86-64-tc/build/build-st-1400964/tmp/work/x86-64-v3-poky-linux/rust/1.91.1/sources/rustc-1.91.1-src/src/tools/tier-check) thread 'main' (163263) panicked at src/tools/tier-check/src/main.rs:16:10:
rustc should run: Os { code: 2, kind: NotFound, message: "No such file or directory" }

Reported: https://github.com/rust-lang/rust/issues/149171

- Fix following error by providing openssl in the image:
error: failed to run custom build command for openssl-sys v0.9.109

Failed to find OpenSSL development headers.
You can try fixing this setting the OPENSSL_DIR environment variable pointing to your OpenSSL installation or installing OpenSSL headers package specific to your distribution.

- Exclude "tests/assembly-llvm/c-variadic-arm.rs" failing on arm32.

---
 meta/lib/oeqa/selftest/cases/rust.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
meta/lib/oeqa/selftest/cases/rust.py +5 -1
index 01a98339a6..355d690a59 100644
@@ -47,7 +47,7 @@ class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase):
         bitbake("{} -c test_compile".format(recipe))
         builddir = get_bb_var("RUSTSRC", "rust")
         # build core-image-minimal with required packages
-        default_installed_packages = ["libgcc", "libstdc++", "libatomic", "libgomp", "libzstd"]
+        default_installed_packages = ["libgcc", "libstdc++", "libatomic", "libgomp", "libzstd", "openssl"]
         features = []
         features.append('IMAGE_FEATURES += "ssh-server-dropbear"')
         features.append('CORE_IMAGE_EXTRA_INSTALL += "{0}"'.format(" ".join(default_installed_packages)))
@@ -75,9 +75,11 @@ class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase):
                             'src/tools/rustdoc-themes',
                             'src/tools/rust-installer',
                             'src/tools/test-float-parse',
+                            'src/tools/tier-check',
                             'src/tools/suggest-tests',
                             'src/tools/tidy',
                             'tests/assembly-llvm/asm/aarch64-outline-atomics.rs',
+                            'tests/assembly-llvm/c-variadic-arm.rs',
                             'tests/codegen-llvm/issues/issue-122805.rs',
                             'tests/codegen-llvm/thread-local.rs',
                             'tests/mir-opt/',
@@ -117,9 +119,11 @@ class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase):
             targetsys = get_bb_var("RUST_TARGET_SYS", "rust")
             rustlibpath = get_bb_var("WORKDIR", "rust")
             tmpdir = get_bb_var("TMPDIR", "rust")
+            staging_dir_native = get_bb_var("STAGING_DIR_NATIVE", "core-image-minimal")
 
             # Set path for target-poky-linux-gcc, RUST_TARGET_PATH and hosttools.
             cmd = "export TARGET_VENDOR=\"-poky\";"
+            cmd = cmd + " export OPENSSL_DIR=%s/usr;" %(staging_dir_native)
             cmd = cmd + " export PATH=%s/recipe-sysroot-native/usr/bin/python3-native:%s/recipe-sysroot-native/usr/bin:%s/recipe-sysroot-native/usr/bin/%s:%s/hosttools:$PATH;" % (rustlibpath, rustlibpath, rustlibpath, tcpath, tmpdir)
             cmd = cmd + " export RUST_TARGET_PATH=%s/rust-targets;" % rustlibpath
             # Strip debug symbols from test binaries to reduce size (300+ MB -> ~140 MB)
Signature · 1 line
2.49.0
#2 lore raw

PATCH 3/5 rust: Upgrade 1.90.0 -> 1.91.0

In reply to [email protected]

From: Yash Shinde <[email protected]>

https://blog.rust-lang.org/2025/10/30/Rust-1.91.0/

* Recent updates to rustc now require 'target_pointer_width' to be specified as an integer.
Cast it to 'int' in rust target configuration to resolve the type consistency error.
https://github.com/rust-lang/rust/pull/144443

* The "remote-test-server" bin is now generated in stage2-tools-bin dir rather than stage1. Update the test suite and recipe accordingly.

* Rebase existing patches with v1.91.0.

* Drop merged patches with rust v1.91.0.
- 0001-libunwind-Use-gcs-instead-of-gcs-target-attribute.patch

    https://github.com/llvm/llvm-project/pull/138077/commits/bcc31a9384d2df1c0f27ef140e1f0f9ee493034f
---
 .../classes-recipe/rust-target-config.bbclass |  2 +-
 meta/conf/distro/include/tcmode-default.inc   |  2 +-
 meta/lib/oeqa/selftest/cases/rust.py          |  2 +-
 .../rust/{cargo_1.90.0.bb => cargo_1.91.0.bb} |  0
 ...-gcs-instead-of-gcs-target-attribute.patch | 66 ----------------
 ...teps-tool.rs-switch-off-lto-for-rust.patch | 20 ++---
 .../rust/files/rust-oe-selftest.patch         | 59 +++++---------
 ...ibstd-rs_1.90.0.bb => libstd-rs_1.91.0.bb} |  0
 ....90.0.bb => rust-cross-canadian_1.91.0.bb} |  0
 meta/recipes-devtools/rust/rust-snapshot.inc  | 78 +++++++++----------
 meta/recipes-devtools/rust/rust-source.inc    |  3 +-
 .../rust/{rust_1.90.0.bb => rust_1.91.0.bb}   |  4 +-
 12 files changed, 74 insertions(+), 162 deletions(-)
 rename meta/recipes-devtools/rust/{cargo_1.90.0.bb => cargo_1.91.0.bb} (100%)
 delete mode 100644 meta/recipes-devtools/rust/files/0001-libunwind-Use-gcs-instead-of-gcs-target-attribute.patch
 rename meta/recipes-devtools/rust/{libstd-rs_1.90.0.bb => libstd-rs_1.91.0.bb} (100%)
 rename meta/recipes-devtools/rust/{rust-cross-canadian_1.90.0.bb => rust-cross-canadian_1.91.0.bb} (100%)
 rename meta/recipes-devtools/rust/{rust_1.90.0.bb => rust_1.91.0.bb} (99%)
meta/classes-recipe/rust-target-config.bbclass +1 -1
index 9ce57843cf..33a290412e 100644
@@ -385,7 +385,7 @@ def rust_gen_target(d, thing, wd, arch):
     if tspec['data-layout'] is None:
         bb.fatal("No rust target defined for %s" % arch_abi)
     tspec['max-atomic-width'] = int(d.getVarFlag('MAX_ATOMIC_WIDTH', arch_abi))
-    tspec['target-pointer-width'] = d.getVarFlag('TARGET_POINTER_WIDTH', arch_abi)
+    tspec['target-pointer-width'] = int(d.getVarFlag('TARGET_POINTER_WIDTH', arch_abi))
     tspec['target-c-int-width'] = int(d.getVarFlag('TARGET_C_INT_WIDTH', arch_abi))
     tspec['target-endian'] = d.getVarFlag('TARGET_ENDIAN', arch_abi)
     tspec['arch'] = arch_to_rust_target_arch(rust_arch)
meta/conf/distro/include/tcmode-default.inc +1 -1
index ff10f14a6b..01e4c7812b 100644
@@ -12,7 +12,7 @@ PREFERRED_PROVIDER_virtual/gettext ??= "gettext"
 GCCVERSION ?= "15.%"
 SDKGCCVERSION ?= "${GCCVERSION}"
 GLIBCVERSION ?= "2.42%"
-RUSTVERSION ?= "1.90.0%"
+RUSTVERSION ?= "1.91.0%"
 
 PREFERRED_VERSION_gcc ?= "${GCCVERSION}"
 PREFERRED_VERSION_gcc-cross-${TARGET_ARCH} ?= "${GCCVERSION}"
meta/lib/oeqa/selftest/cases/rust.py +1 -1
index 355d690a59..ebc9204420 100644
@@ -110,7 +110,7 @@ class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase):
             # Copy remote-test-server to image through scp
             host_sys = get_bb_var("RUST_BUILD_SYS", "rust")
             ssh = SSHControl(ip=qemu.ip, logfile=qemu.sshlog, user="root")
-            ssh.copy_to(builddir + "/build/" + host_sys + "/stage1-tools-bin/remote-test-server","~/")
+            ssh.copy_to(builddir + "/build/" + host_sys + "/stage2-tools-bin/remote-test-server","~/")
             # Execute remote-test-server on image through background ssh
             command = '~/remote-test-server --bind 0.0.0.0:12345 -v'
             sshrun=subprocess.Popen(("ssh", '-o',  'UserKnownHostsFile=/dev/null', '-o',  'StrictHostKeyChecking=no', '-f', "root@%s" % qemu.ip, command), shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
meta/recipes-devtools/rust/cargo_1.91.0.bb renamed from meta/recipes-devtools/rust/cargo_1.90.0.bb +0 -0
similarity index 100%
rename from meta/recipes-devtools/rust/cargo_1.90.0.bb
rename to meta/recipes-devtools/rust/cargo_1.91.0.bb
meta/recipes-devtools/rust/files/0001-libunwind-Use-gcs-instead-of-gcs-target-attribute.patch deleted +0 -66

66 lines not on this page · raw message

meta/recipes-devtools/rust/files/0001-src-core-build_steps-tool.rs-switch-off-lto-for-rust.patch +11 -9
index 7f25ba95ed..a8232b928a 100644
@@ -24,9 +24,9 @@ diff --git a/src/bootstrap/src/core/build_steps/tool.rs b/src/bootstrap/src/core
 index 087df2f8a..00790affb 100644
 --- a/src/bootstrap/src/core/build_steps/tool.rs
 +++ b/src/bootstrap/src/core/build_steps/tool.rs
-@@ -16,14 +16,12 @@ use std::{env, fs};
- #[cfg(feature = "tracing")]
- use tracing::instrument;
+@@ -13,14 +13,12 @@ use std::ffi::OsStr;
+ use std::path::PathBuf;
+ use std::{env, fs};
 
 -use crate::core::build_steps::compile::is_lto_stage;
  use crate::core::build_steps::toolstate::ToolState;
@@ -41,14 +41,16 @@ index 087df2f8a..00790affb 100644
 +use crate::core::config::{DebuginfoLevel, TargetSelection};
  use crate::utils::exec::{BootstrapCommand, command};
  use crate::utils::helpers::{add_dylib_path, exe, t};
- use crate::{Compiler, FileType, Kind, Mode, gha};
-@@ -160,20 +158,7 @@ impl Step for ToolBuild {
+ use crate::{Compiler, FileType, Kind, Mode};
+@@ -121,22 +119,7 @@ impl Step for ToolBuild {
              cargo.env("RUSTC_WRAPPER", ccache);
          }
 
--        // Rustc tools (miri, clippy, cargo, rustfmt, rust-analyzer)
+-        // RustcPrivate tools (miri, clippy, rustfmt, rust-analyzer) and cargo
 -        // could use the additional optimizations.
--        if self.mode == Mode::ToolRustc && is_lto_stage(&self.build_compiler) {
+-        if is_lto_stage(&self.build_compiler)
+-            && (self.mode == Mode::ToolRustcPrivate || self.path == "src/tools/cargo")
+-        {
 -            let lto = match builder.config.rust_lto {
 -                RustcLto::Off => Some("off"),
 -                RustcLto::Thin => Some("thin"),
@@ -67,7 +69,7 @@ index 087df2f8a..00790affb 100644
 diff --git a/src/bootstrap/src/core/builder/mod.rs b/src/bootstrap/src/core/builder/mod.rs
 --- a/src/bootstrap/src/core/builder/mod.rs
 +++ b/src/bootstrap/src/core/builder/mod.rs
-@@ -13,7 +13,7 @@
+@@ -13,7 +13,7 @@ use clap::ValueEnum;
  #[cfg(feature = "tracing")]
  use tracing::instrument;
  
@@ -75,4 +77,4 @@ diff --git a/src/bootstrap/src/core/builder/mod.rs b/src/bootstrap/src/core/buil
 +pub use self::cargo::Cargo;
  pub use crate::Compiler;
  use crate::core::build_steps::compile::{Std, StdLink};
- use crate::core::build_steps::{
+ use crate::core::build_steps::tool::RustcPrivateCompilers;
meta/recipes-devtools/rust/files/rust-oe-selftest.patch +18 -41

153 lines not on this page · raw message

meta/recipes-devtools/rust/libstd-rs_1.91.0.bb renamed from meta/recipes-devtools/rust/libstd-rs_1.90.0.bb +0 -0
similarity index 100%
rename from meta/recipes-devtools/rust/libstd-rs_1.90.0.bb
rename to meta/recipes-devtools/rust/libstd-rs_1.91.0.bb
meta/recipes-devtools/rust/rust-cross-canadian_1.91.0.bb renamed from meta/recipes-devtools/rust/rust-cross-canadian_1.90.0.bb +0 -0
similarity index 100%
rename from meta/recipes-devtools/rust/rust-cross-canadian_1.90.0.bb
rename to meta/recipes-devtools/rust/rust-cross-canadian_1.91.0.bb
meta/recipes-devtools/rust/rust-snapshot.inc +39 -39

95 lines not on this page · raw message

meta/recipes-devtools/rust/rust-source.inc +1 -2
index cf8274b443..562bcbf4c5 100644
@@ -7,10 +7,9 @@ SRC_URI += "https://static.rust-lang.org/dist/rustc-${RUST_VERSION}-src.tar.xz;n
             file://oeqa-selftest-Increase-timeout-in-process-sigpipe-ru.patch;patchdir=${RUSTSRC} \
             file://0001-src-core-build_steps-tool.rs-switch-off-lto-for-rust.patch;patchdir=${RUSTSRC} \
             file://revert-link-std-statically-in-rustc_driver-feature.patch;patchdir=${RUSTSRC} \
-            file://0001-libunwind-Use-gcs-instead-of-gcs-target-attribute.patch;patchdir=${RUSTSRC} \
             file://0001-riscv32-Define-plain-syscalls-as-their-time64-varian.patch;patchdir=${RUSTSRC} \
 "
-SRC_URI[rust.sha256sum] = "6bfeaddd90ffda2f063492b092bfed925c4b8c701579baf4b1316e021470daac"
+SRC_URI[rust.sha256sum] = "9b94161dba3aa32192e0e75f7891912d98095ffb86087b07a05af35a0265a938"
 
 RUSTSRC = "${UNPACKDIR}/rustc-${RUST_VERSION}-src"
 
meta/recipes-devtools/rust/rust_1.91.0.bb renamed from meta/recipes-devtools/rust/rust_1.90.0.bb +2 -2
similarity index 99%
rename from meta/recipes-devtools/rust/rust_1.90.0.bb
rename to meta/recipes-devtools/rust/rust_1.91.0.bb
index e7f3985332..a25f65f674 100644
@@ -293,7 +293,7 @@ rust_do_install:class-nativesdk() {
 
     install -d ${D}${bindir}
     for i in cargo-clippy clippy-driver rustfmt; do
-        cp build/${RUST_BUILD_SYS}/stage1-tools/${RUST_HOST_SYS}/release/$i ${D}${bindir}
+        cp build/${RUST_BUILD_SYS}/stage2-tools/${RUST_HOST_SYS}/release/$i ${D}${bindir}
         patchelf --set-rpath "\$ORIGIN/../lib" ${D}${bindir}/$i
     done
 
@@ -328,7 +328,7 @@ rust_do_install:class-target() {
 
     install -d ${D}${bindir}
     for i in ${EXTRA_TOOLS}; do
-        cp build/${RUST_BUILD_SYS}/stage1-tools/${RUST_HOST_SYS}/release/$i ${D}${bindir}
+        cp build/${RUST_BUILD_SYS}/stage2-tools/${RUST_HOST_SYS}/release/$i ${D}${bindir}
         patchelf --set-rpath "\$ORIGIN/../lib" ${D}${bindir}/$i
     done
 
Signature · 1 line
2.49.0
#3 lore raw

PATCH 4/5 rust: remove passing tests from excluded and ignored list.

In reply to [email protected]

From: Yash Shinde <[email protected]>

Remove the ignore tags for passing riscv64 tests and drop obsolete "tests/codegen-llvm/issues/issue-122805.rs" from exclude test list.

---
 meta/lib/oeqa/selftest/cases/rust.py          |   1 -
 .../rust/files/rust-oe-selftest.patch         | 100 ------------------
 2 files changed, 101 deletions(-)
meta/lib/oeqa/selftest/cases/rust.py +0 -1
index ebc9204420..3a41391101 100644
@@ -80,7 +80,6 @@ class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase):
                             'src/tools/tidy',
                             'tests/assembly-llvm/asm/aarch64-outline-atomics.rs',
                             'tests/assembly-llvm/c-variadic-arm.rs',
-                            'tests/codegen-llvm/issues/issue-122805.rs',
                             'tests/codegen-llvm/thread-local.rs',
                             'tests/mir-opt/',
                             'tests/run-make',
meta/recipes-devtools/rust/files/rust-oe-selftest.patch +0 -100

106 lines not on this page · raw message

Signature · 1 line
2.49.0
#4 lore raw

Re: [PATCH 4/5] rust: remove passing tests from excluded and ignored list.

Quoted 4 lines · On 2025-12-10 5:18 a.m., [email protected] wrote:

From: Yash Shinde<[email protected]>

Remove the ignore tags for passing riscv64 tests and drop obsolete "tests/codegen-llvm/issues/issue-122805.rs"

Can you add the upstream commit id/shortlog that removed the test? The issue is still open it seems:
https://github.com/llvm/llvm-project/issues/122805

so you should explain that as well.

../Randy

Quoted 131 lines

from exclude test list.

---
  meta/lib/oeqa/selftest/cases/rust.py          |   1 -
  .../rust/files/rust-oe-selftest.patch         | 100 ------------------
  2 files changed, 101 deletions(-)
meta/lib/oeqa/selftest/cases/rust.py +0 -1
index ebc9204420..3a41391101 100644
@@ -80,7 +80,6 @@ class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase):
                              'src/tools/tidy',
                              'tests/assembly-llvm/asm/aarch64-outline-atomics.rs',
                              'tests/assembly-llvm/c-variadic-arm.rs',
-                            'tests/codegen-llvm/issues/issue-122805.rs',
                              'tests/codegen-llvm/thread-local.rs',
                              'tests/mir-opt/',
                              'tests/run-make',
meta/recipes-devtools/rust/files/rust-oe-selftest.patch +0 -100
index 7d26d75820..b39b326455 100644
@@ -202,106 +202,6 @@ index a05f274136..0e69b4cb98 100644
   fn sparse_inserts() {
       let cache: VecCache<u32, u8, u32> = VecCache::default();
       let end = if cfg!(target_pointer_width = "64") && cfg!(target_os = "linux") {
-diff --git a/tests/assembly-llvm/dwarf-mixed-versions-lto.rs b/tests/assembly-llvm/dwarf-mixed-versions-lto.rs
-index 828328df843..30753c56c76 100644
---- a/tests/assembly-llvm/dwarf-mixed-versions-lto.rs
-+++ b/tests/assembly-llvm/dwarf-mixed-versions-lto.rs
-@@ -8,6 +8,7 @@
- //@ compile-flags: -C lto -g -Cdwarf-version=5
- //@ assembly-output: emit-asm
- //@ no-prefer-dynamic
-+//@ ignore-riscv64
-
- extern crate dwarf_mixed_versions_lto_aux;
-
-diff --git a/tests/codegen-llvm/const-vector.rs b/tests/codegen-llvm/const-vector.rs
-index f4307492341..617e31140e9 100644
---- a/tests/codegen-llvm/const-vector.rs
-+++ b/tests/codegen-llvm/const-vector.rs
-@@ -3,6 +3,7 @@
- //@ [OPT0_S390X] only-s390x
- //@ [OPT0] compile-flags: -C no-prepopulate-passes -Copt-level=0
- //@ [OPT0_S390X] compile-flags: -C no-prepopulate-passes -Copt-level=0 -C target-cpu=z13
-+//@ ignore-riscv64
-
- // This test checks that constants of SIMD type are passed as immediate vectors.
- // We ensure that both vector representations (struct with fields and struct wrapping array) work.
-diff --git a/tests/codegen-llvm/enum/enum-aggregate.rs b/tests/codegen-llvm/enum/enum-aggregate.rs
-index 0161e5f3fa1..773a06fabb4 100644
---- a/tests/codegen-llvm/enum/enum-aggregate.rs
-+++ b/tests/codegen-llvm/enum/enum-aggregate.rs
-@@ -1,6 +1,7 @@
- //@ compile-flags: -Copt-level=0 -Cno-prepopulate-passes
- //@ min-llvm-version: 19
- //@ only-64bit
-+//@ ignore-riscv64
-
- #![crate_type = "lib"]
-
-diff --git a/tests/codegen-llvm/enum/enum-match.rs b/tests/codegen-llvm/enum/enum-match.rs
-index 57db44ec74e..1e2507f7c90 100644
---- a/tests/codegen-llvm/enum/enum-match.rs
-+++ b/tests/codegen-llvm/enum/enum-match.rs
-@@ -1,5 +1,6 @@
- //@ compile-flags: -Copt-level=1
- //@ only-64bit
-+//@ ignore-riscv64
-
- #![crate_type = "lib"]
- #![feature(core_intrinsics)]
-diff --git a/tests/codegen-llvm/enum/enum-transparent-extract.rs b/tests/codegen-llvm/enum/enum-transparent-extract.rs
-index c5efb8d472b..e79b8916fc1 100644
---- a/tests/codegen-llvm/enum/enum-transparent-extract.rs
-+++ b/tests/codegen-llvm/enum/enum-transparent-extract.rs
-@@ -1,5 +1,6 @@
- //@ compile-flags: -Copt-level=0
- //@ only-64bit
-+//@ ignore-riscv64
-
- #![crate_type = "lib"]
-
-diff --git a/tests/codegen-llvm/repeat-operand-zero-len.rs b/tests/codegen-llvm/repeat-operand-zero-len.rs
-index b4cec42a07c..d450fead9a4 100644
---- a/tests/codegen-llvm/repeat-operand-zero-len.rs
-+++ b/tests/codegen-llvm/repeat-operand-zero-len.rs
-@@ -1,4 +1,5 @@
- //@ compile-flags: -Copt-level=1 -Cno-prepopulate-passes
-+//@ ignore-riscv64
-
- // This test is here to hit the `Rvalue::Repeat` case in `codegen_rvalue_operand`.
- // It only applies when the resulting array is a ZST, so the test is written in
-diff --git a/tests/codegen-llvm/simd/extract-insert-dyn.rs b/tests/codegen-llvm/simd/extract-insert-dyn.rs
-index 729f0145314..2b1d1beb86a 100644
---- a/tests/codegen-llvm/simd/extract-insert-dyn.rs
-+++ b/tests/codegen-llvm/simd/extract-insert-dyn.rs
-@@ -1,4 +1,5 @@
- //@compile-flags: -C opt-level=3 -C no-prepopulate-passes
-+//@ ignore-riscv64
-
- #![feature(
-     core_intrinsics,
-diff --git a/tests/codegen-llvm/transmute-scalar.rs b/tests/codegen-llvm/transmute-scalar.rs
-index ce1b0558b2e..e8fda2cd566 100644
---- a/tests/codegen-llvm/transmute-scalar.rs
-+++ b/tests/codegen-llvm/transmute-scalar.rs
-@@ -1,6 +1,7 @@
- //@ add-core-stubs
- //@ compile-flags: -C opt-level=0 -C no-prepopulate-passes --target=x86_64-unknown-linux-gnu
- //@ needs-llvm-components: x86
-+//@ ignore-riscv64
-
- #![crate_type = "lib"]
- #![feature(no_core, repr_simd)]
-diff --git a/tests/codegen-llvm/uninhabited-transparent-return-abi.rs b/tests/codegen-llvm/uninhabited-transparent-return-abi.rs
-index face1577c3f..09e0846bad0 100644
---- a/tests/codegen-llvm/uninhabited-transparent-return-abi.rs
-+++ b/tests/codegen-llvm/uninhabited-transparent-return-abi.rs
-@@ -1,4 +1,5 @@
- //@ compile-flags: -Copt-level=3
-+//@ ignore-riscv64
-
- // Seehttps://github.com/rust-lang/rust/issues/135802
-
  diff --git a/tests/ui/abi/rust-cold-works-with-rustic-args.rs b/tests/ui/abi/rust-cold-works-with-rustic-args.rs
  index 551485469d3..575db924968 100644
  --- a/tests/ui/abi/rust-cold-works-with-rustic-args.rs
Signature · 2 lines
# Randy MacLeod
# Wind River Linux
#5 lore raw

Re: [PATCH 4/5] rust: remove passing tests from excluded and ignored list.

Quoted 11 lines · Randy MacLeod
Quoted 4 lines · On 2025-12-10 5:18 a.m., [email protected] wrote:

From: Yash Shinde<[email protected]>

Remove the ignore tags for passing riscv64 tests and drop obsolete "tests/codegen-llvm/issues/issue-122805.rs"

Can you add the upstream commit id/shortlog that removed the test? The issue is still open it seems:
https://github.com/llvm/llvm-project/issues/122805

so you should explain that as well.

Actually, the issue is:
https://github.com/rust-lang/rust/issues/122805
https://github.com/rust-lang/rust/issues/122805#issuecomment-2012121917

and the test-case was renamed to "dont-shuffle-bswaps.rs" which passes now:
https://github.com/rust-lang/rust/commit/3580698996f6da6f006477809d7959bffcfd3bf0

Quoted 138 lines

../Randy

Quoted 131 lines

from exclude test list.

---
  meta/lib/oeqa/selftest/cases/rust.py          |   1 -
  .../rust/files/rust-oe-selftest.patch         | 100 ------------------
  2 files changed, 101 deletions(-)
meta/lib/oeqa/selftest/cases/rust.py +0 -1
index ebc9204420..3a41391101 100644
@@ -80,7 +80,6 @@ class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase):
                              'src/tools/tidy',
                              'tests/assembly-llvm/asm/aarch64-outline-atomics.rs',
                              'tests/assembly-llvm/c-variadic-arm.rs',
-                            'tests/codegen-llvm/issues/issue-122805.rs',
                              'tests/codegen-llvm/thread-local.rs',
                              'tests/mir-opt/',
                              'tests/run-make',
meta/recipes-devtools/rust/files/rust-oe-selftest.patch +0 -100
index 7d26d75820..b39b326455 100644
@@ -202,106 +202,6 @@ index a05f274136..0e69b4cb98 100644
   fn sparse_inserts() {
       let cache: VecCache<u32, u8, u32> = VecCache::default();
       let end = if cfg!(target_pointer_width = "64") && cfg!(target_os = "linux") {
-diff --git a/tests/assembly-llvm/dwarf-mixed-versions-lto.rs b/tests/assembly-llvm/dwarf-mixed-versions-lto.rs
-index 828328df843..30753c56c76 100644
---- a/tests/assembly-llvm/dwarf-mixed-versions-lto.rs
-+++ b/tests/assembly-llvm/dwarf-mixed-versions-lto.rs
-@@ -8,6 +8,7 @@
- //@ compile-flags: -C lto -g -Cdwarf-version=5
- //@ assembly-output: emit-asm
- //@ no-prefer-dynamic
-+//@ ignore-riscv64
-
- extern crate dwarf_mixed_versions_lto_aux;
-
-diff --git a/tests/codegen-llvm/const-vector.rs b/tests/codegen-llvm/const-vector.rs
-index f4307492341..617e31140e9 100644
---- a/tests/codegen-llvm/const-vector.rs
-+++ b/tests/codegen-llvm/const-vector.rs
-@@ -3,6 +3,7 @@
- //@ [OPT0_S390X] only-s390x
- //@ [OPT0] compile-flags: -C no-prepopulate-passes -Copt-level=0
- //@ [OPT0_S390X] compile-flags: -C no-prepopulate-passes -Copt-level=0 -C target-cpu=z13
-+//@ ignore-riscv64
-
- // This test checks that constants of SIMD type are passed as immediate vectors.
- // We ensure that both vector representations (struct with fields and struct wrapping array) work.
-diff --git a/tests/codegen-llvm/enum/enum-aggregate.rs b/tests/codegen-llvm/enum/enum-aggregate.rs
-index 0161e5f3fa1..773a06fabb4 100644
---- a/tests/codegen-llvm/enum/enum-aggregate.rs
-+++ b/tests/codegen-llvm/enum/enum-aggregate.rs
-@@ -1,6 +1,7 @@
- //@ compile-flags: -Copt-level=0 -Cno-prepopulate-passes
- //@ min-llvm-version: 19
- //@ only-64bit
-+//@ ignore-riscv64
-
- #![crate_type = "lib"]
-
-diff --git a/tests/codegen-llvm/enum/enum-match.rs b/tests/codegen-llvm/enum/enum-match.rs
-index 57db44ec74e..1e2507f7c90 100644
---- a/tests/codegen-llvm/enum/enum-match.rs
-+++ b/tests/codegen-llvm/enum/enum-match.rs
-@@ -1,5 +1,6 @@
- //@ compile-flags: -Copt-level=1
- //@ only-64bit
-+//@ ignore-riscv64
-
- #![crate_type = "lib"]
- #![feature(core_intrinsics)]
-diff --git a/tests/codegen-llvm/enum/enum-transparent-extract.rs b/tests/codegen-llvm/enum/enum-transparent-extract.rs
-index c5efb8d472b..e79b8916fc1 100644
---- a/tests/codegen-llvm/enum/enum-transparent-extract.rs
-+++ b/tests/codegen-llvm/enum/enum-transparent-extract.rs
-@@ -1,5 +1,6 @@
- //@ compile-flags: -Copt-level=0
- //@ only-64bit
-+//@ ignore-riscv64
-
- #![crate_type = "lib"]
-
-diff --git a/tests/codegen-llvm/repeat-operand-zero-len.rs b/tests/codegen-llvm/repeat-operand-zero-len.rs
-index b4cec42a07c..d450fead9a4 100644
---- a/tests/codegen-llvm/repeat-operand-zero-len.rs
-+++ b/tests/codegen-llvm/repeat-operand-zero-len.rs
-@@ -1,4 +1,5 @@
- //@ compile-flags: -Copt-level=1 -Cno-prepopulate-passes
-+//@ ignore-riscv64
-
- // This test is here to hit the `Rvalue::Repeat` case in `codegen_rvalue_operand`.
- // It only applies when the resulting array is a ZST, so the test is written in
-diff --git a/tests/codegen-llvm/simd/extract-insert-dyn.rs b/tests/codegen-llvm/simd/extract-insert-dyn.rs
-index 729f0145314..2b1d1beb86a 100644
---- a/tests/codegen-llvm/simd/extract-insert-dyn.rs
-+++ b/tests/codegen-llvm/simd/extract-insert-dyn.rs
-@@ -1,4 +1,5 @@
- //@compile-flags: -C opt-level=3 -C no-prepopulate-passes
-+//@ ignore-riscv64
-
- #![feature(
-     core_intrinsics,
-diff --git a/tests/codegen-llvm/transmute-scalar.rs b/tests/codegen-llvm/transmute-scalar.rs
-index ce1b0558b2e..e8fda2cd566 100644
---- a/tests/codegen-llvm/transmute-scalar.rs
-+++ b/tests/codegen-llvm/transmute-scalar.rs
-@@ -1,6 +1,7 @@
- //@ add-core-stubs
- //@ compile-flags: -C opt-level=0 -C no-prepopulate-passes --target=x86_64-unknown-linux-gnu
- //@ needs-llvm-components: x86
-+//@ ignore-riscv64
-
- #![crate_type = "lib"]
- #![feature(no_core, repr_simd)]
-diff --git a/tests/codegen-llvm/uninhabited-transparent-return-abi.rs b/tests/codegen-llvm/uninhabited-transparent-return-abi.rs
-index face1577c3f..09e0846bad0 100644
---- a/tests/codegen-llvm/uninhabited-transparent-return-abi.rs
-+++ b/tests/codegen-llvm/uninhabited-transparent-return-abi.rs
-@@ -1,4 +1,5 @@
- //@ compile-flags: -Copt-level=3
-+//@ ignore-riscv64
-
- // Seehttps://github.com/rust-lang/rust/issues/135802
-
  diff --git a/tests/ui/abi/rust-cold-works-with-rustic-args.rs b/tests/ui/abi/rust-cold-works-with-rustic-args.rs
  index 551485469d3..575db924968 100644
  --- a/tests/ui/abi/rust-cold-works-with-rustic-args.rs
Signature · 2 lines
# Randy MacLeod
# Wind River Linux
#6 lore raw

Re: [PATCH 4/5] rust: remove passing tests from excluded and ignored list.

Quoted 13 lines · Yash Shinde
Quoted 11 lines · Randy MacLeod
Quoted 4 lines · On 2025-12-10 5:18 a.m., [email protected] wrote:

From: Yash Shinde<[email protected]>

Remove the ignore tags for passing riscv64 tests and drop obsolete "tests/codegen-llvm/issues/issue-122805.rs"

Can you add the upstream commit id/shortlog that removed the test? The issue is still open it seems:
https://github.com/llvm/llvm-project/issues/122805

so you should explain that as well.

Quoted 8 lines

Actually, the issue is:
https://github.com/rust-lang/rust/issues/122805
https://github.com/rust-lang/rust/issues/122805#issuecomment-2012121917

and the test-case was renamed to "dont-shuffle-bswaps.rs" which passes now:
https://github.com/rust-lang/rust/commit/3580698996f6da6f006477809d7959bffcfd3bf0

Ah, wrong project.
Please include this info in your v2 commit log.

Thanks,

../Randy

Quoted 156 lines
Quoted 156 lines

../Randy

Quoted 148 lines

from exclude test list.

---
  meta/lib/oeqa/selftest/cases/rust.py          |   1 - .../rust/files/rust-oe-selftest.patch         | 100
------------------

  2 files changed, 101 deletions(-)
meta/lib/oeqa/selftest/cases/rust.py +0 -0
index ebc9204420..3a41391101 100644
@@ -80,7 +80,6 @@ class 

RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase):
                              'src/tools/tidy', 'tests/assembly-llvm/asm/aarch64-outline-atomics.rs', 'tests/assembly-llvm/c-variadic-arm.rs',
- 'tests/codegen-llvm/issues/issue-122805.rs', 'tests/codegen-llvm/thread-local.rs',
                              'tests/mir-opt/', 'tests/run-make',

meta/recipes-devtools/rust/files/rust-oe-selftest.patch +0 -1
index 7d26d75820..b39b326455 100644
@@ -202,106 +202,6 @@ index a05f274136..0e69b4cb98 100644
    fn sparse_inserts() {
        let cache: VecCache<u32, u8, u32> = VecCache::default();
        let end = if cfg!(target_pointer_width = "64") && cfg!(target_os = "linux") {
-diff --git a/tests/assembly-llvm/dwarf-mixed-versions-lto.rs 

b/tests/assembly-llvm/dwarf-mixed-versions-lto.rs

meta/recipes-devtools/rust/files/rust-oe-selftest.patch +0 -12
-index 828328df843..30753c56c76 100644
---- a/tests/assembly-llvm/dwarf-mixed-versions-lto.rs
-+++ b/tests/assembly-llvm/dwarf-mixed-versions-lto.rs
-@@ -8,6 +8,7 @@
- //@ compile-flags: -C lto -g -Cdwarf-version=5
- //@ assembly-output: emit-asm
- //@ no-prefer-dynamic
-+//@ ignore-riscv64
-
- extern crate dwarf_mixed_versions_lto_aux;
-
-diff --git a/tests/codegen-llvm/const-vector.rs 

b/tests/codegen-llvm/const-vector.rs

meta/recipes-devtools/rust/files/rust-oe-selftest.patch +0 -11
-index f4307492341..617e31140e9 100644
---- a/tests/codegen-llvm/const-vector.rs
-+++ b/tests/codegen-llvm/const-vector.rs
-@@ -3,6 +3,7 @@
- //@ [OPT0_S390X] only-s390x
- //@ [OPT0] compile-flags: -C no-prepopulate-passes -Copt-level=0
- //@ [OPT0_S390X] compile-flags: -C no-prepopulate-passes 
-Copt-level=0 -C target-cpu=z13
-+//@ ignore-riscv64
-
- // This test checks that constants of SIMD type are passed as 

immediate vectors.
- // We ensure that both vector representations (struct with fields and struct wrapping array) work.
-diff --git a/tests/codegen-llvm/enum/enum-aggregate.rs b/tests/codegen-llvm/enum/enum-aggregate.rs

meta/recipes-devtools/rust/files/rust-oe-selftest.patch +0 -12
-index 0161e5f3fa1..773a06fabb4 100644
---- a/tests/codegen-llvm/enum/enum-aggregate.rs
-+++ b/tests/codegen-llvm/enum/enum-aggregate.rs
-@@ -1,6 +1,7 @@
- //@ compile-flags: -Copt-level=0 -Cno-prepopulate-passes
- //@ min-llvm-version: 19
- //@ only-64bit
-+//@ ignore-riscv64
-
- #![crate_type = "lib"]
-
-diff --git a/tests/codegen-llvm/enum/enum-match.rs 

b/tests/codegen-llvm/enum/enum-match.rs

meta/recipes-devtools/rust/files/rust-oe-selftest.patch +0 -11
-index 57db44ec74e..1e2507f7c90 100644
---- a/tests/codegen-llvm/enum/enum-match.rs
-+++ b/tests/codegen-llvm/enum/enum-match.rs
-@@ -1,5 +1,6 @@
- //@ compile-flags: -Copt-level=1
- //@ only-64bit
-+//@ ignore-riscv64
-
- #![crate_type = "lib"]
- #![feature(core_intrinsics)]
-diff --git a/tests/codegen-llvm/enum/enum-transparent-extract.rs 

b/tests/codegen-llvm/enum/enum-transparent-extract.rs

meta/recipes-devtools/rust/files/rust-oe-selftest.patch +0 -11
-index c5efb8d472b..e79b8916fc1 100644
---- a/tests/codegen-llvm/enum/enum-transparent-extract.rs
-+++ b/tests/codegen-llvm/enum/enum-transparent-extract.rs
-@@ -1,5 +1,6 @@
- //@ compile-flags: -Copt-level=0
- //@ only-64bit
-+//@ ignore-riscv64
-
- #![crate_type = "lib"]
-
-diff --git a/tests/codegen-llvm/repeat-operand-zero-len.rs 

b/tests/codegen-llvm/repeat-operand-zero-len.rs

meta/recipes-devtools/rust/files/rust-oe-selftest.patch +0 -8
-index b4cec42a07c..d450fead9a4 100644
---- a/tests/codegen-llvm/repeat-operand-zero-len.rs
-+++ b/tests/codegen-llvm/repeat-operand-zero-len.rs
-@@ -1,4 +1,5 @@
- //@ compile-flags: -Copt-level=1 -Cno-prepopulate-passes
-+//@ ignore-riscv64
-
- // This test is here to hit the `Rvalue::Repeat` case in 

codegen_rvalue_operand.
- // It only applies when the resulting array is a ZST, so the test is written in
-diff --git a/tests/codegen-llvm/simd/extract-insert-dyn.rs b/tests/codegen-llvm/simd/extract-insert-dyn.rs

meta/recipes-devtools/rust/files/rust-oe-selftest.patch +0 -10
-index 729f0145314..2b1d1beb86a 100644
---- a/tests/codegen-llvm/simd/extract-insert-dyn.rs
-+++ b/tests/codegen-llvm/simd/extract-insert-dyn.rs
-@@ -1,4 +1,5 @@
- //@compile-flags: -C opt-level=3 -C no-prepopulate-passes
-+//@ ignore-riscv64
-
- #![feature(
-     core_intrinsics,
-diff --git a/tests/codegen-llvm/transmute-scalar.rs 

b/tests/codegen-llvm/transmute-scalar.rs

meta/recipes-devtools/rust/files/rust-oe-selftest.patch +0 -13
-index ce1b0558b2e..e8fda2cd566 100644
---- a/tests/codegen-llvm/transmute-scalar.rs
-+++ b/tests/codegen-llvm/transmute-scalar.rs
-@@ -1,6 +1,7 @@
- //@ add-core-stubs
- //@ compile-flags: -C opt-level=0 -C no-prepopulate-passes 
--target=x86_64-unknown-linux-gnu
- //@ needs-llvm-components: x86
-+//@ ignore-riscv64
-
- #![crate_type = "lib"]
- #![feature(no_core, repr_simd)]
-diff --git 

a/tests/codegen-llvm/uninhabited-transparent-return-abi.rs b/tests/codegen-llvm/uninhabited-transparent-return-abi.rs

meta/recipes-devtools/rust/files/rust-oe-selftest.patch +0 -9
-index face1577c3f..09e0846bad0 100644
---- a/tests/codegen-llvm/uninhabited-transparent-return-abi.rs
-+++ b/tests/codegen-llvm/uninhabited-transparent-return-abi.rs
-@@ -1,4 +1,5 @@
- //@ compile-flags: -Copt-level=3
-+//@ ignore-riscv64
-
- // Seehttps://github.com/rust-lang/rust/issues/135802
-

  diff --git a/tests/ui/abi/rust-cold-works-with-rustic-args.rs b/tests/ui/abi/rust-cold-works-with-rustic-args.rs index 551485469d3..575db924968 100644
  --- a/tests/ui/abi/rust-cold-works-with-rustic-args.rs

Signature · 2 lines
# Randy MacLeod
# Wind River Linux
Signature · 2 lines
# Randy MacLeod
# Wind River Linux
#7 lore raw

PATCH 5/5 rust: Upgrade 1.91.0 -> 1.91.1

In reply to [email protected]

From: Yash Shinde <[email protected]>

https://blog.rust-lang.org/2025/11/10/Rust-1.91.1/

Test results summary:

rust v1.91.1

   +-----------+--------+---------+
   | Machine   | Passed | Ignored |
   +-----------+--------+---------+
   | arm-32    | 29,968 |  1,510  |
   | arm-64    | 30,071 |  1,447  |
   | x86-32    | 29,985 |  1,489  |
   | x86-64    | 30,229 |  1,247  |
   | riscv-64  | 30,045 |  1,472  |
   +-----------+--------+---------+

Test results difference (1.91.1 - 1.90):

   +-----------+--------+---------+
   | Machine   | Passed | Ignored |
   +-----------+--------+---------+
   | arm-32    |  +451  |   -19   |
   | arm-64    |  +463  |   -24   |
   | x86-32    |  +477  |   -18   |
   | x86-64    |  +326  |   -28   |
   | riscv-64  |  +461  |   -22   |
   +-----------+--------+---------+
---
 meta/conf/distro/include/tcmode-default.inc                     | 2 +-
 meta/recipes-devtools/rust/{cargo_1.91.0.bb => cargo_1.91.1.bb} | 0
 .../rust/{libstd-rs_1.91.0.bb => libstd-rs_1.91.1.bb}           | 0
 ...t-cross-canadian_1.91.0.bb => rust-cross-canadian_1.91.1.bb} | 0
 meta/recipes-devtools/rust/rust-source.inc                      | 2 +-
 meta/recipes-devtools/rust/{rust_1.91.0.bb => rust_1.91.1.bb}   | 0
 6 files changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-devtools/rust/{cargo_1.91.0.bb => cargo_1.91.1.bb} (100%)
 rename meta/recipes-devtools/rust/{libstd-rs_1.91.0.bb => libstd-rs_1.91.1.bb} (100%)
 rename meta/recipes-devtools/rust/{rust-cross-canadian_1.91.0.bb => rust-cross-canadian_1.91.1.bb} (100%)
 rename meta/recipes-devtools/rust/{rust_1.91.0.bb => rust_1.91.1.bb} (100%)
meta/conf/distro/include/tcmode-default.inc +1 -1
index 01e4c7812b..20acf3524f 100644
@@ -12,7 +12,7 @@ PREFERRED_PROVIDER_virtual/gettext ??= "gettext"
 GCCVERSION ?= "15.%"
 SDKGCCVERSION ?= "${GCCVERSION}"
 GLIBCVERSION ?= "2.42%"
-RUSTVERSION ?= "1.91.0%"
+RUSTVERSION ?= "1.91.1%"
 
 PREFERRED_VERSION_gcc ?= "${GCCVERSION}"
 PREFERRED_VERSION_gcc-cross-${TARGET_ARCH} ?= "${GCCVERSION}"
meta/recipes-devtools/rust/cargo_1.91.1.bb renamed from meta/recipes-devtools/rust/cargo_1.91.0.bb +0 -0
similarity index 100%
rename from meta/recipes-devtools/rust/cargo_1.91.0.bb
rename to meta/recipes-devtools/rust/cargo_1.91.1.bb
meta/recipes-devtools/rust/libstd-rs_1.91.1.bb renamed from meta/recipes-devtools/rust/libstd-rs_1.91.0.bb +0 -0
similarity index 100%
rename from meta/recipes-devtools/rust/libstd-rs_1.91.0.bb
rename to meta/recipes-devtools/rust/libstd-rs_1.91.1.bb
meta/recipes-devtools/rust/rust-cross-canadian_1.91.1.bb renamed from meta/recipes-devtools/rust/rust-cross-canadian_1.91.0.bb +0 -0
similarity index 100%
rename from meta/recipes-devtools/rust/rust-cross-canadian_1.91.0.bb
rename to meta/recipes-devtools/rust/rust-cross-canadian_1.91.1.bb
meta/recipes-devtools/rust/rust-source.inc +1 -1
index 562bcbf4c5..f714487428 100644
@@ -9,7 +9,7 @@ SRC_URI += "https://static.rust-lang.org/dist/rustc-${RUST_VERSION}-src.tar.xz;n
             file://revert-link-std-statically-in-rustc_driver-feature.patch;patchdir=${RUSTSRC} \
             file://0001-riscv32-Define-plain-syscalls-as-their-time64-varian.patch;patchdir=${RUSTSRC} \
 "
-SRC_URI[rust.sha256sum] = "9b94161dba3aa32192e0e75f7891912d98095ffb86087b07a05af35a0265a938"
+SRC_URI[rust.sha256sum] = "66401bb815e236cc6b2aacbbe23b61b286c1fe27a67902e7c0222cfe77b3dbab"
 
 RUSTSRC = "${UNPACKDIR}/rustc-${RUST_VERSION}-src"
 
meta/recipes-devtools/rust/rust_1.91.1.bb renamed from meta/recipes-devtools/rust/rust_1.91.0.bb +0 -0
similarity index 100%
rename from meta/recipes-devtools/rust/rust_1.91.0.bb
rename to meta/recipes-devtools/rust/rust_1.91.1.bb
Signature · 1 line
2.49.0
#8 lore raw

Re: [PATCH 5/5] rust: Upgrade 1.91.0 -> 1.91.1

Quoted 19 lines · On 2025-12-10 5:18 a.m., [email protected] wrote:

From: Yash Shinde<[email protected]>

https://blog.rust-lang.org/2025/11/10/Rust-1.91.1/

Test results summary:

    rust v1.91.1
    +-----------+--------+---------+
    | Machine   | Passed | Ignored |
    +-----------+--------+---------+
    | arm-32    | 29,968 |  1,510  |
    | arm-64    | 30,071 |  1,447  |
    | x86-32    | 29,985 |  1,489  |
    | x86-64    | 30,229 |  1,247  |
    | riscv-64  | 30,045 |  1,472  |
    +-----------+--------+---------+

    Test results difference (1.91.1 - 1.90):
    +-----------+--------+---------+
Quoted 8 lines
    | Machine   | Passed | Ignored |
    +-----------+--------+---------+
    | arm-32    |  +451  |   -19   |
    | arm-64    |  +463  |   -24   |
    | x86-32    |  +477  |   -18   |
    | x86-64    |  +326  |   -28   |
    | riscv-64  |  +461  |   -22   |
    +-----------+--------+---------+

Nice work on reducing the number of ignored tests!

Only ~1300 more to go ! ;-)

../Randy

Quoted 55 lines
---
  meta/conf/distro/include/tcmode-default.inc                     | 2 +-
  meta/recipes-devtools/rust/{cargo_1.91.0.bb => cargo_1.91.1.bb} | 0
  .../rust/{libstd-rs_1.91.0.bb => libstd-rs_1.91.1.bb}           | 0
  ...t-cross-canadian_1.91.0.bb => rust-cross-canadian_1.91.1.bb} | 0
  meta/recipes-devtools/rust/rust-source.inc                      | 2 +-
  meta/recipes-devtools/rust/{rust_1.91.0.bb => rust_1.91.1.bb}   | 0
  6 files changed, 2 insertions(+), 2 deletions(-)

rename meta/recipes-devtools/rust/{cargo_1.91.0.bb => cargo_1.91.1.bb} (100%)
rename meta/recipes-devtools/rust/{libstd-rs_1.91.0.bb => libstd-rs_1.91.1.bb} (100%) rename meta/recipes-devtools/rust/{rust-cross-canadian_1.91.0.bb => rust-cross-canadian_1.91.1.bb} (100%) rename meta/recipes-devtools/rust/{rust_1.91.0.bb => rust_1.91.1.bb} (100%)

meta/conf/distro/include/tcmode-default.inc +1 -1
index 01e4c7812b..20acf3524f 100644
@@ -12,7 +12,7 @@ PREFERRED_PROVIDER_virtual/gettext ??= "gettext"
  GCCVERSION ?= "15.%"
  SDKGCCVERSION ?= "${GCCVERSION}"
  GLIBCVERSION ?= "2.42%"
-RUSTVERSION ?= "1.91.0%"
+RUSTVERSION ?= "1.91.1%"
 
  PREFERRED_VERSION_gcc ?= "${GCCVERSION}"
  PREFERRED_VERSION_gcc-cross-${TARGET_ARCH} ?= "${GCCVERSION}"
meta/recipes-devtools/rust/cargo_1.91.1.bb renamed from meta/recipes-devtools/rust/cargo_1.91.0.bb +0 -0
similarity index 100%
rename from meta/recipes-devtools/rust/cargo_1.91.0.bb
rename to meta/recipes-devtools/rust/cargo_1.91.1.bb
meta/recipes-devtools/rust/libstd-rs_1.91.1.bb renamed from meta/recipes-devtools/rust/libstd-rs_1.91.0.bb +0 -0
similarity index 100%
rename from meta/recipes-devtools/rust/libstd-rs_1.91.0.bb
rename to meta/recipes-devtools/rust/libstd-rs_1.91.1.bb
meta/recipes-devtools/rust/rust-cross-canadian_1.91.1.bb renamed from meta/recipes-devtools/rust/rust-cross-canadian_1.91.0.bb +0 -0
similarity index 100%
rename from meta/recipes-devtools/rust/rust-cross-canadian_1.91.0.bb
rename to meta/recipes-devtools/rust/rust-cross-canadian_1.91.1.bb
meta/recipes-devtools/rust/rust-source.inc +0 -0
index 562bcbf4c5..f714487428 100644
@@ -9,7 +9,7 @@ SRC_URI +="https://static.rust-lang.org/dist/rustc-${RUST_VERSION}-src.tar.xz;n 

file://revert-link-std-statically-in-rustc_driver-feature.patch;patchdir=${RUSTSRC} \ file://0001-riscv32-Define-plain-syscalls-as-their-time64-varian.patch;patchdir=${RUSTSRC} \ "

meta/recipes-devtools/rust/rust-source.inc +1 -1
-SRC_URI[rust.sha256sum] = "9b94161dba3aa32192e0e75f7891912d98095ffb86087b07a05af35a0265a938"
+SRC_URI[rust.sha256sum] = "66401bb815e236cc6b2aacbbe23b61b286c1fe27a67902e7c0222cfe77b3dbab"
 
  RUSTSRC = "${UNPACKDIR}/rustc-${RUST_VERSION}-src"
meta/recipes-devtools/rust/rust_1.91.1.bb renamed from meta/recipes-devtools/rust/rust_1.91.0.bb +0 -0
similarity index 100%
rename from meta/recipes-devtools/rust/rust_1.91.0.bb
rename to meta/recipes-devtools/rust/rust_1.91.1.bb
Signature · 2 lines
# Randy MacLeod
# Wind River Linux
#9 lore raw
In reply to [email protected]

Add Peter since this is/was his patch and you have his SOB line. Please do that in the future.

I have some comments and questions that could go contribute to a v2 but so far, I don't object, too strongly, to merging patch 1/5 at least!

Quoted 3 lines · On 2025-12-10 5:17 a.m., [email protected] wrote:

From: Peter Tatrai<[email protected]>

Rust's internal LLVM

Is this an old comment? llvm is now an oe-core  recipe and we don't use rust's internal llvm as far as I know (which isn't very far!).

Quoted 1 line

requires zlib and zstd compression libraries when

Yes, we have a patch for clang for this:
meta/recipes-devtools/clang/clang/0024-llvm-Do-not-use-cmake-infra-to-detect-libzstd.patch adding in meta-clang in 2022:
https://github.com/kraj/meta-clang/commit/0f38186ae93400b870f7f92938bbf8643e7da958
and the llvm-project commit is (1).

Anyway, Khem,

What are your thoughts about this patch and about using cmake for llvm?

Quoted 12 lines

building rustc_codegen_llvm and other compiler components. Without these dependencies, building Rust for target fails with linker errors:

error: linking with target-rust-ccld failed: exit status: 1 = note: undefined reference to `compress2'
= note: undefined reference to `uncompress'
= note: undefined reference to `ZSTD_decompress'
= note: undefined reference to `ZSTD_isError'
= note: undefined reference to `ZSTD_compress2'
= note: undefined reference to `crc32'

Quoted 4 lines

This manifested in oe-selftest failure on qemuppc:
oe-selftest -r rust.RustSelfTestSystemEmulated.test_rust

Additionally, this was observed while testing with other targets as well.

If you have a list on hand of which targets had this problem, that might be useful to include in the log. It might help us understand why the problem seems to be arch-specific.

Quoted 12 lines
---
  meta/lib/oeqa/selftest/cases/rust.py | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
meta/lib/oeqa/selftest/cases/rust.py +0 -0
index 31222e2456..01a98339a6 100644

meta/lib/oeqa/selftest/cases/rust.py class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase): · line 51

Quoted 6 lines
meta/lib/oeqa/selftest/cases/rust.py +1 -1
@@ -47,7 +47,7 @@ class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase):
          bitbake("{} -c test_compile".format(recipe))
          builddir = get_bb_var("RUSTSRC", "rust")
          # build core-image-minimal with required packages
-        default_installed_packages = ["libgcc", "libstdc++", "libatomic", "libgomp"]
+        default_installed_packages = ["libgcc", "libstdc++", "libatomic", "libgomp", "libzstd"]
 

This has been present since the original rust.py selftest was added. It seems like a hack in that things are added to (blindly?) fix linking errors rather than getting to the root cause of the problem.

That may be acceptable in the short run but shouldn't the list should be just what rustc/cargo from rustup depend on:
❯ which rustc
/home/rmacleod/.cargo/bin/rustc
❯ ldd which rustc
    linux-vdso.so.1 (0x00007a636834b000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007a636830b000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007a6368306000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007a6368301000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007a636821a000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007a6368215000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007a6366a00000) /lib64/ld-linux-x86-64.so.2 (0x00007a636834d000)

❯ cargo --version
cargo 1.91.1 (ea2d97820 2025-10-10)
❯ which cargo
/home/rmacleod/.cargo/bin/cargo
❯ ldd which cargo
    linux-vdso.so.1 (0x0000789ffe470000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x0000789ffe430000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x0000789ffe42b000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x0000789ffe426000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x0000789ffcf19000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x0000789ffe421000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x0000789ffcc00000) /lib64/ld-linux-x86-64.so.2 (0x0000789ffe472000)

perhaps with the exception of libatomic and libgomp which seem like valid requirements. I guess I'm really wondering if libzstd even libatomic and libgomp, should be RDEPENDs for some recipe.

meta/lib/oeqa/selftest/cases/rust.py class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase): · line 130

Quoted 12 lines
meta/lib/oeqa/selftest/cases/rust.py +0 -0
          features = []
          features.append('IMAGE_FEATURES += "ssh-server-dropbear"')
          features.append('CORE_IMAGE_EXTRA_INSTALL += "{0}"'.format(" ".join(default_installed_packages)))
meta/lib/oeqa/selftest/cases/rust.py +1 -1
@@ -124,7 +124,7 @@ class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase):
              cmd = cmd + " export RUST_TARGET_PATH=%s/rust-targets;" % rustlibpath
              # Strip debug symbols from test binaries to reduce size (300+ MB -> ~140 MB)
              # PowerPC mac99 QEMU has 768MB RAM limit, so we need to minimize test binary sizes
-            cmd = cmd + " export RUSTFLAGS='-C strip=debuginfo';"
+            cmd = cmd + " export RUSTFLAGS='-C strip=debuginfo -Clink-arg=-lz -Clink-arg=-lzstd';"
              # Trigger testing.
              cmd = cmd + " export TEST_DEVICE_ADDR=\"%s:12345\";" % qemu.ip
              cmd = cmd + " cd %s; python3 src/bootstrap/bootstrap.py test %s --target %s" % (builddir, testargs, targetsys)

../Randy

1) https://github.com/llvm/llvm-project/commit/e939bf67e34037970192fa90ad22ab7628f5de33

commit e939bf67e34037970192fa90ad22ab7628f5de33
Author: Cole Kissane <[email protected]>
Date:   Tue Jul 19 13:54:35 2022

    [llvm] add zstd to llvm::compression namespace

    - add zstd to llvm::compression namespace
    - add a CMake option LLVM_ENABLE_ZSTD with behavior mirroring that of LLVM_ENABLE_ZLIB
    - add tests for zstd to llvm/unittests/Support/CompressionTest.cpp
    - debian users should install libzstd when using LLVM_ENABLE_ZSTD=FORCE_ON from source due to this bug https://bugs.launchpad.net/ubuntu/+source/libzstd/+bug/1941956

    Reviewed By: leonardchan, MaskRay

    Differential Revision: https://reviews.llvm.org/D128465

Signature · 2 lines
# Randy MacLeod
# Wind River Linux
#10 lore raw
Quoted 7 lines · Randy MacLeod

Add Peter since this is/was his patch and you have his SOB line. Please do that in the future.

I have some comments and questions that could go contribute to a v2 but so far, I don't object, too strongly, to merging patch 1/5 at least!

Quoted 6 lines
Quoted 3 lines · On 2025-12-10 5:17 a.m., [email protected] wrote:

From: Peter Tatrai<[email protected]>

Rust's internal LLVM

Is this an old comment? llvm is now an oe-core  recipe and we don't use rust's internal llvm as far as I know (which isn't very far!).

I kept the message from Peter's patch unchanged which was submitted around the same time when rust-llvm was dropped. I will reword the commit message in v2, if required.

For more details: https://lists.openembedded.org/g/openembedded-core/message/225636

Quoted 7 lines
Quoted 2 lines

requires zlib and zstd compression libraries when

Yes, we have a patch for clang for this:
meta/recipes-devtools/clang/clang/0024-llvm-Do-not-use-cmake-infra-to-detect-libzstd.patch adding in meta-clang in 2022:
https://github.com/kraj/meta-clang/commit/0f38186ae93400b870f7f92938bbf8643e7da958
and the llvm-project commit is (1).

The selftest execution environment requires the zlib and zstd features as llvm enables them unless explicitly disabled.

The rust recipe level RUSTFLAGS aren't propagated to qemu image for testing. This requires explicit passing of the flags for zstd lib.
(zlib is already available by default in core-image-minimal)

The following error confirms that rust via llvm expects these libs to be available in the image for testing.

Quoted 16 lines

Anyway, Khem,

What are your thoughts about this patch and about using cmake for llvm?

Quoted 12 lines

building rustc_codegen_llvm and other compiler components. Without these dependencies, building Rust for target fails with linker errors:

error: linking with target-rust-ccld failed: exit status: 1 = note: undefined reference to `compress2'
= note: undefined reference to `uncompress'
= note: undefined reference to `ZSTD_decompress'
= note: undefined reference to `ZSTD_isError'
= note: undefined reference to `ZSTD_compress2'
= note: undefined reference to `crc32'

Quoted 7 lines
Quoted 4 lines

This manifested in oe-selftest failure on qemuppc:
oe-selftest -r rust.RustSelfTestSystemEmulated.test_rust

Additionally, this was observed while testing with other targets as well.

If you have a list on hand of which targets had this problem, that might be useful to include in the log. It might help us understand why the problem seems to be arch-specific.

Peter reported it for ppc target but eventually it was observed on all targets in our testings, i.e arm32, arm64, riscv-64, x86-32 and x86-64.
So, this is a generic requirement rather than arch-specific.

Quoted 49 lines
Quoted 11 lines
---
  meta/lib/oeqa/selftest/cases/rust.py | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
meta/lib/oeqa/selftest/cases/rust.py +0 -0
index 31222e2456..01a98339a6 100644

meta/lib/oeqa/selftest/cases/rust.py class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase): · line 51

Quoted 6 lines
meta/lib/oeqa/selftest/cases/rust.py +1 -1
@@ -47,7 +47,7 @@ class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase):
          bitbake("{} -c test_compile".format(recipe))
          builddir = get_bb_var("RUSTSRC", "rust")
          # build core-image-minimal with required packages
-        default_installed_packages = ["libgcc", "libstdc++", "libatomic", "libgomp"]
+        default_installed_packages = ["libgcc", "libstdc++", "libatomic", "libgomp", "libzstd"]
 

This has been present since the original rust.py selftest was added. It seems like a hack in that things are added to (blindly?) fix linking errors rather than getting to the root cause of the problem.

That may be acceptable in the short run but shouldn't the list should be just what rustc/cargo from rustup depend on:
❯ which rustc
/home/rmacleod/.cargo/bin/rustc
❯ ldd which rustc
    linux-vdso.so.1 (0x00007a636834b000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007a636830b000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007a6368306000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007a6368301000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007a636821a000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007a6368215000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007a6366a00000) /lib64/ld-linux-x86-64.so.2 (0x00007a636834d000)

❯ cargo --version
cargo 1.91.1 (ea2d97820 2025-10-10)
❯ which cargo
/home/rmacleod/.cargo/bin/cargo
❯ ldd which cargo
    linux-vdso.so.1 (0x0000789ffe470000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x0000789ffe430000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x0000789ffe42b000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x0000789ffe426000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x0000789ffcf19000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x0000789ffe421000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x0000789ffcc00000) /lib64/ld-linux-x86-64.so.2 (0x0000789ffe472000)

Quoted 2 lines

perhaps with the exception of libatomic and libgomp which seem like valid requirements. I guess I'm really wondering if libzstd even libatomic and libgomp, should be RDEPENDs for some recipe.

The list of packages in "default_installed_packages" is needed to include additional selftest requirements apart from the default ones used in core-image-minimal. These are actual requirements rather than hack. Adding them in DEPENDS/RDEPENDS do not propagate the dependencies in selftest qemu image.

Quoted 40 lines

meta/lib/oeqa/selftest/cases/rust.py class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase): · line 130

Quoted 13 lines
meta/lib/oeqa/selftest/cases/rust.py +0 -0
          features = []
          features.append('IMAGE_FEATURES += "ssh-server-dropbear"')
          features.append('CORE_IMAGE_EXTRA_INSTALL += "{0}"'.format(" ".join(default_installed_packages)))
meta/lib/oeqa/selftest/cases/rust.py +1 -1
@@ -124,7 +124,7 @@ class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase):
              cmd = cmd + " export RUST_TARGET_PATH=%s/rust-targets;" % rustlibpath
              # Strip debug symbols from test binaries to reduce size (300+ MB -> ~140 MB)
              # PowerPC mac99 QEMU has 768MB RAM limit, so we need to minimize test binary sizes
-            cmd = cmd + " export RUSTFLAGS='-C strip=debuginfo';"
+            cmd = cmd + " export RUSTFLAGS='-C strip=debuginfo -Clink-arg=-lz -Clink-arg=-lzstd';"
              # Trigger testing.
              cmd = cmd + " export TEST_DEVICE_ADDR=\"%s:12345\";" % qemu.ip
              cmd = cmd + " cd %s; python3 src/bootstrap/bootstrap.py test %s --target %s" % (builddir, testargs, targetsys)

../Randy

1) https://github.com/llvm/llvm-project/commit/e939bf67e34037970192fa90ad22ab7628f5de33

commit e939bf67e34037970192fa90ad22ab7628f5de33
Author: Cole Kissane <[email protected]>
Date:   Tue Jul 19 13:54:35 2022

    [llvm] add zstd to llvm::compression namespace

    - add zstd to llvm::compression namespace
    - add a CMake option LLVM_ENABLE_ZSTD with behavior mirroring that of LLVM_ENABLE_ZLIB
    - add tests for zstd to llvm/unittests/Support/CompressionTest.cpp
    - debian users should install libzstd when using LLVM_ENABLE_ZSTD=FORCE_ON from source due to this bug https://bugs.launchpad.net/ubuntu/+source/libzstd/+bug/1941956

    Reviewed By: leonardchan, MaskRay

    Differential Revision: https://reviews.llvm.org/D128465

Signature · 2 lines
# Randy MacLeod
# Wind River Linux
#11 lore raw
Quoted 13 lines · Yash Shinde
Quoted 10 lines · Randy MacLeod

Add Peter since this is/was his patch and you have his SOB line. Please do that in the future.

I have some comments and questions that could go contribute to a v2 but so far, I don't object, too strongly, to merging patch 1/5 at least!

Quoted 2 lines · On 2025-12-10 5:17 a.m., [email protected] wrote:

From: Peter Tatrai<[email protected]>

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

Rust's internal LLVM

Is this an old comment? llvm is now an oe-core  recipe and we don't use rust's internal llvm as far as I know (which isn't very far!).

I kept the message from Peter's patch unchanged which was submitted around the same time when rust-llvm was dropped. I will reword the commit message in v2, if required.

For more details: https://lists.openembedded.org/g/openembedded-core/message/225636

Good.

Quoted 9 lines
Quoted 8 lines
Quoted 3 lines

requires zlib and zstd compression libraries when

Yes, we have a patch for clang for this:
meta/recipes-devtools/clang/clang/0024-llvm-Do-not-use-cmake-infra-to-detect-libzstd.patch adding in meta-clang in 2022:
https://github.com/kraj/meta-clang/commit/0f38186ae93400b870f7f92938bbf8643e7da958
and the llvm-project commit is (1).

Quoted 9 lines

The selftest execution environment requires the zlib and zstd features as llvm enables them unless explicitly disabled.

The rust recipe level RUSTFLAGS aren't propagated to qemu image for testing. This requires explicit passing of the flags for zstd lib.
(zlib is already available by default in core-image-minimal)

The following error confirms that rust via llvm expects these libs to be available in the image for testing.

Okay.

Quoted 19 lines
Quoted 19 lines

Anyway, Khem,

What are your thoughts about this patch and about using cmake for llvm?

Quoted 15 lines

building rustc_codegen_llvm and other compiler components. Without these dependencies, building Rust for target fails with linker errors:

error: linking with target-rust-ccld failed: exit status: 1 = note: undefined reference to `compress2'
= note: undefined reference to `uncompress'
= note: undefined reference to `ZSTD_decompress'
= note: undefined reference to `ZSTD_isError'
= note: undefined reference to `ZSTD_compress2'
= note: undefined reference to `crc32'

This manifested in oe-selftest failure on qemuppc:
oe-selftest -r rust.RustSelfTestSystemEmulated.test_rust

Quoted 9 lines
Quoted 4 lines
Quoted 1 line

Additionally, this was observed while testing with other targets as well.

If you have a list on hand of which targets had this problem, that might be useful to include in the log. It might help us understand why the problem seems to be arch-specific.

Peter reported it for ppc target but eventually it was observed on all targets in our testings, i.e arm32, arm64, riscv-64, x86-32 and x86-64.
So, this is a generic requirement rather than arch-specific.

Good so please revise your v2 commit log to indicate exactly what you observed.

../Randy

Quoted 96 lines
Quoted 50 lines
Quoted 12 lines
---
  meta/lib/oeqa/selftest/cases/rust.py | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
meta/lib/oeqa/selftest/cases/rust.py +0 -0
index 31222e2456..01a98339a6 100644

meta/lib/oeqa/selftest/cases/rust.py class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase): · line 51

Quoted 6 lines
meta/lib/oeqa/selftest/cases/rust.py +1 -1
@@ -47,7 +47,7 @@ class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase):
          bitbake("{} -c test_compile".format(recipe))
          builddir = get_bb_var("RUSTSRC", "rust")
          # build core-image-minimal with required packages
-        default_installed_packages = ["libgcc", "libstdc++", "libatomic", "libgomp"]
+        default_installed_packages = ["libgcc", "libstdc++", "libatomic", "libgomp", "libzstd"]
 

This has been present since the original rust.py selftest was added. It seems like a hack in that things are added to (blindly?) fix linking errors rather than getting to the root cause of the problem.

That may be acceptable in the short run but shouldn't the list should be just what rustc/cargo from rustup depend on:
❯ which rustc
/home/rmacleod/.cargo/bin/rustc
❯ ldd which rustc
    linux-vdso.so.1 (0x00007a636834b000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007a636830b000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007a6368306000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007a6368301000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007a636821a000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007a6368215000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007a6366a00000) /lib64/ld-linux-x86-64.so.2 (0x00007a636834d000)

❯ cargo --version
cargo 1.91.1 (ea2d97820 2025-10-10)
❯ which cargo
/home/rmacleod/.cargo/bin/cargo
❯ ldd which cargo
    linux-vdso.so.1 (0x0000789ffe470000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x0000789ffe430000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x0000789ffe42b000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x0000789ffe426000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x0000789ffcf19000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x0000789ffe421000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x0000789ffcc00000) /lib64/ld-linux-x86-64.so.2 (0x0000789ffe472000)

Quoted 2 lines

perhaps with the exception of libatomic and libgomp which seem like valid requirements. I guess I'm really wondering if libzstd even libatomic and libgomp, should be RDEPENDs for some recipe.

The list of packages in "default_installed_packages" is needed to include additional selftest requirements apart from the default ones used in core-image-minimal. These are actual requirements rather than hack. Adding them in DEPENDS/RDEPENDS do not propagate the dependencies in selftest qemu image.

Quoted 40 lines

meta/lib/oeqa/selftest/cases/rust.py class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase): · line 130

Quoted 13 lines
meta/lib/oeqa/selftest/cases/rust.py +0 -0
          features = []
          features.append('IMAGE_FEATURES += "ssh-server-dropbear"')
          features.append('CORE_IMAGE_EXTRA_INSTALL += "{0}"'.format(" ".join(default_installed_packages)))
meta/lib/oeqa/selftest/cases/rust.py +1 -1
@@ -124,7 +124,7 @@ class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase):
              cmd = cmd + " export RUST_TARGET_PATH=%s/rust-targets;" % rustlibpath
              # Strip debug symbols from test binaries to reduce size (300+ MB -> ~140 MB)
              # PowerPC mac99 QEMU has 768MB RAM limit, so we need to minimize test binary sizes
-            cmd = cmd + " export RUSTFLAGS='-C strip=debuginfo';"
+            cmd = cmd + " export RUSTFLAGS='-C strip=debuginfo -Clink-arg=-lz -Clink-arg=-lzstd';"
              # Trigger testing.
              cmd = cmd + " export TEST_DEVICE_ADDR=\"%s:12345\";" % qemu.ip
              cmd = cmd + " cd %s; python3 src/bootstrap/bootstrap.py test %s --target %s" % (builddir, testargs, targetsys)

../Randy

1) https://github.com/llvm/llvm-project/commit/e939bf67e34037970192fa90ad22ab7628f5de33

commit e939bf67e34037970192fa90ad22ab7628f5de33
Author: Cole Kissane <[email protected]>
Date:   Tue Jul 19 13:54:35 2022

    [llvm] add zstd to llvm::compression namespace

    - add zstd to llvm::compression namespace
    - add a CMake option LLVM_ENABLE_ZSTD with behavior mirroring that of LLVM_ENABLE_ZLIB
    - add tests for zstd to llvm/unittests/Support/CompressionTest.cpp
    - debian users should install libzstd when using LLVM_ENABLE_ZSTD=FORCE_ON from source due to this bug https://bugs.launchpad.net/ubuntu/+source/libzstd/+bug/1941956

    Reviewed By: leonardchan, MaskRay

    Differential Revision: https://reviews.llvm.org/D128465

Signature · 2 lines
# Randy MacLeod
# Wind River Linux
Signature · 2 lines
# Randy MacLeod
# Wind River Linux